package com.yyf.spring.boot.controller;

import com.yyf.spring.boot.service.UserService;
import com.yyf.spring.boot.vo.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

	@Autowired
	private UserService userService;


	@GetMapping("/get/users")
	@ResponseBody
	public Message listUser(@RequestParam(defaultValue = "1") int pn) {
		return userService.listUser(pn);
	}

}
